<?php

declare(strict_types=1);

namespace app\model;

use think\Model;
use think\model\concern\SoftDelete;

class AuthPermission extends Model
{
    use SoftDelete;

    protected $name = 'auth_permission';

    protected $autoWriteTimestamp = 'datetime';

    public function roles()
    {
        return $this->belongsToMany(AuthRole::class, 'auth_role_perm', 'role_id', 'permission_id');
    }
}
